#ifndef __COMMUNICATE_WITH_DISTRIBUTE_SERVER__
#define __COMMUNICATE_WITH_DISTRIBUTE_SERVER__

#include "iotgo_platformAPI.h"

/* macro: error*/
#define DSERVER_ERROR_NONE           0
#define DSERVER_ERROR_NOT_FINISHED  -1
#define DSERVER_ERROR_INVALID_STATE -2
#define DSERVER_ERROR_INIT          -2
#define DSERVER_ERROR_CONNECT       -3
#define DSERVER_ERROR_QUERY         -4

/* macro: communicate pace state with distribute server */
#define DSERVER_IS_NOT_STARTED    -1
#define DSERVER_HAS_INITED         1
#define DSERVER_SOCKET_IS_READY    2
#define DSERVER_QUERY_IS_DONE      3

extern int communicateWithDistrServer(void);
extern int cleanWithDistrServer(void);
extern int getStateWithDistrServer(void);

#endif
